//
//  TitleView.m
//  B段项目
//
//  Created by 徐茂怀 on 15/11/4.
//  Copyright © 2015年 徐茂怀. All rights reserved.
//

#import "TitleView.h"
#import "FitHeader.h"
@implementation TitleView

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}
-(void)createView
{
    _titleLabel = [[UILabel alloc]init];
    _titleLabel.font = [UIFont fontWithName:@"EuphemiaUCAS-Bold" size:25 * FitWidth];
    _titleLabel.textColor = [UIColor whiteColor];
//    _titleLabel.alpha = 0.5;
    _xialaImageView = [[UIImageView alloc]init];
    _xialaImageView.image = [UIImage imageNamed:@"iconfont-sanjiao.png"];
    
    [self addSubview:_titleLabel];
    [self addSubview:_xialaImageView];
}

-(void)layoutSubviews
{
    [super layoutSubviews];
    _titleLabel.frame = CGRectMake(10 * FitWidth, 5 * FitHeight, 190 * FitWidth, 44 * FitHeight);
    _xialaImageView.frame = CGRectMake(_titleLabel.frame.origin.x + _titleLabel.frame.size.width + 10 * FitWidth, 20 * FitHeight, 16 * FitWidth, 16 * FitHeight);
}

@end
